package com.lyf.scm.admin.domain.remote.allocationservice;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.api.dto.SalesPlanOtherAccuracyDTO;
import com.lyf.scm.admin.api.dto.SalesPlanOtherAccuracyInfoDTO;
import com.lyf.scm.admin.api.dto.SalesPlanOtherDifferinDTO;
import com.lyf.scm.admin.api.dto.SalesPlanOtherDifferinInfoDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * description:
 * 其他渠道计划_目标与销售计划准确率
 * @author: huangtao
 * @data: 2020/7/31
 */
@FeignClient(name = "scm-plan-service")
public interface SalesPlanOtherAccuracyRemote {

    /**
     * 按条件查询其他渠道计划_目标与销售计划准确率(周)
     * @param salesPlanOtherAccuracy
     * @return
     */
    @PostMapping("/api/v1/salesPlanOtherAccuracy/listWeek")
    Response<PageInfo<SalesPlanOtherAccuracyInfoDTO>> listWeekBySelective(@RequestBody SalesPlanOtherAccuracyDTO salesPlanOtherAccuracy);

    /**
     * 查询全渠道其他渠道计划_目标与销售计划准确率(范围)
     * @param salesPlanOtherAccuracy
     * @return
     */
    @PostMapping("/api/v1/salesPlanOtherAccuracy/listAllByCycles")
    Response<List<SalesPlanOtherAccuracyInfoDTO>> listAllByCycles(@RequestBody SalesPlanOtherAccuracyDTO salesPlanOtherAccuracy);

    @PostMapping(value = "/api/v1/salesPlanOtherAccuracy/export",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    feign.Response export(@RequestBody SalesPlanOtherAccuracyDTO salesPlanOtherAccuracyDTO, @RequestParam("type") Integer type);

    /**
     * 删除对应标识的数据
     *
     * @param opSign
     * @return
     */
    @PostMapping("/api/v1/salesPlanOtherAccuracy/delete")
    Response delete(@RequestParam("opSign") String opSign);
}
